A debugger program, or debugging tool, is a computer program that is used to test and debug another program (the “target” program), and which allows to run in a controlled manner the target program and analyse the run-time behaviour thereof. A debugger program typically runs on an apparatus comprising a memory storing the target program and a set of instructions representing the debugger program and one or more microprocessors configured to execute the target program and the debugger program. Depending on the specific implementation, the debugger may be executed by the same microprocessor and memory as the target program, or be executed on a separate microprocessor and memory. The latter case can e.g. be used to debug embedded systems, by connecting a microprocessor system which runs the debugger program to the embedded system which runs the target program in a manner that the debugger program controls the execution of the target program.
A user, such as a computer programmer, can use the debugger program to set certain breakpoints for analysing the behaviour of the target program. A breakpoint is an intentional suspension or pausing the execution of the target program at a certain position in the target program, put in place for debugging purposes. If the execution of the target program is suspended, the target program is said to be in “break mode”. When in break mode, the state of the target program remains, and execution can be continued upon exiting break mode. Since the state of the target program is preserved when the target enters in break mode, the state can be inspected, e.g. by verifying the content of general purpose registers, memory, logs, files, etc., to find out whether the target program is functioning as expected.
A conditional breakpoint is a breakpoint which occurs if one or more predefined conditions are satisfied at the position specified by the breakpoint, such as starting execution of a programmer-specified instruction in the target program at the position or reading, writing, or modification of a specific location in an area of memory at the position. A conditional breakpoint consists of one or more conditions that determine when a program's execution should be interrupted.
The standard approach for handling a conditional breakpoint is that upon arriving at the position in the target program specified by the breakpoint, the target program is paused and the debugger program evaluates the condition associated with this breakpoint. If the condition is false, the debugger program will resume the execution of the target program. If the condition is true, the debugger program does not resume the execution and presents the current state to the to a human being through a suitable man-machine interface of to another pogram such as a software analysis program.
However, this standard approach has a very low processing speed for the conditional breakpoints, and may alter the behaviour for real-time applications. The standard approach will also introduce large delays in the execution of the target program if the position of the breakpoint is inside a loop (software or hardware), interrupt handler, inline function, or any code that is executed multiple times.